package tests.fakes;

import jeconbond.economic.agent.service.IPreActServiceAgent;
import jeconbond.economic.resources.IResourceType;
import jeconbond.economic.systems.natural.NaturalResourceRedestributionSystem;

public class ReuseGroundAgent implements IPreActServiceAgent {
	private NaturalResourceRedestributionSystem nrrs;
	private IResourceType ground;

	public ReuseGroundAgent(
			NaturalResourceRedestributionSystem nrrs,
			IResourceType ground
	) {
		this.ground = ground;
		this.nrrs = nrrs;
	}

	public void processPostProduceStage() {}

	public void processPreProduceStage() {
		double stored = nrrs.howMuchWasStored(ground);
		nrrs.receiveResource(ground, stored);
		nrrs.storeResource(ground, 1.0);
	}

	public void processProduceStage() {}
}
